package com.peng.utils.log;

import ch.qos.logback.core.rolling.RollingFileAppender;

import java.io.File;

/**
 * CustomFileAppender
 *
 * @author: lupeng6
 * @create: 2020/2/24 15:12
 */
public class CustomFileAppender extends RollingFileAppender {
    public CustomFileAppender() {
        String logHome = "/home/work/logs/supervisor";
        if (new File(logHome).exists()) {
            this.setFile(logHome + "/app.log");
        } else {
            this.setFile("./logs/app.log");
        }
    }
}
